"""
配置文件

简洁的层级配置管理
"""

class JinxiangZZ:
    """金相组织分析模块配置"""
    model_path = "../weights/JinXiang_ZZ/fullmodel_iter_best.onnx"
    input_folder = "D:/op/dataset_ZZ/train/test"
    output_folder = "D:/op/dataset_ZZ/train/result"
    target_classes = [1, 2]
    device = "cpu"


class API:
    """API服务配置"""
    host = "0.0.0.0"
    port = 8791
    title = "金相组织分析API"
    description = "基于深度学习的金相组织分割分析API"
    version = "1.0.0"


# 为了向后兼容，提供简化的访问方式
MODEL_PATH = JinxiangZZ.model_path
DEFAULT_INPUT_FOLDER = JinxiangZZ.input_folder
DEFAULT_OUTPUT_FOLDER = JinxiangZZ.output_folder
DEFAULT_TARGET_CLASSES = JinxiangZZ.target_classes
DEFAULT_DEVICE = JinxiangZZ.device

## curl "http://localhost:8789/api/v1/analyze/folder/simple?input_folder=/path/to/input&output_folder=/path/to/output&target_classes=1,2&device=cpu"
## curl "http://localhost:8789/api/v1/analyze/folder/simple?input_folder=/Volumes/data1/JH/projects/jinxiang/dataset_ZZ/train/test"